//======================================================================================================================
// 2007 Copyright Mystic Lake Software
//
// This file is part of The Ham Radio Network.
//
// The Ham Radio Network is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// The Ham Radio Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//======================================================================================================================
//
//     Author: Rudyard Merriam
//
//      $Id: Counter.cpp 3 2007-09-19 04:25:45Z k5rud@arrl.net $
//
//======================================================================================================================
//
#include <iostream>
#include <bitset>
using namespace std;

typedef bitset<8> Bitset8;
//==========================================================================================================================
int main(int argc, char *argv[ ])
{
    size_t cntall = 0;
    size_t cntones = 0;
    while (!cin.eof())
    {
        Bitset8 in;
        cin >> in;
        if (cin.good())
        {
            cntall += 8;
            cntones += in.count();
        }
    }
    cout << "\t" << cntones / (float)cntall 
         << endl;
}
